package com.laituo.juyou.admin.api.supplier;


import com.laituo.juyou.core.annotation.HttpMethod;
import com.laituo.juyou.core.annotation.HttpOpenApi;
import com.laituo.juyou.core.annotation.HttpParam;
import com.laituo.juyou.core.annotation.HttpParamType;
import com.laituo.juyou.core.annotation.param.NotNull;
import com.laituo.juyou.core.exception.ServiceException;
import com.laituo.juyou.data.domain.SupplierDO;
import com.laituo.juyou.data.dto.ActivityDTO;
import com.laituo.juyou.data.dto.EnumsDTO;
import com.laituo.juyou.data.model.Page;

import java.util.List;

/**
 * @author kaixin
 * @date 2020/03/01
 */
@HttpOpenApi(group = "admin.supplier", description = "供应商管理")
public interface SupplierService {

    @HttpMethod(description = "新增", permissionParentName = "供应商管理", permissionName = "供应商管理")
    public String create(
            @NotNull @HttpParam(name = "activityDTO", type = HttpParamType.COMMON, description = "供应商管理JSON数据") SupplierDO supplierDO) throws ServiceException;


    @HttpMethod(description = "查询",  permissionParentName = "供应商管理", permissionName = "供应商管理")
    public SupplierDO queryActivityById(
            @NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "活动ID") Long id) throws ServiceException;


    @HttpMethod(description = "列表",  permissionParentName = "供应商管理", permissionName = "供应商管理")
    public Page<SupplierDO> list(
            @HttpParam(name = "page", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer page,
            @HttpParam(name = "limit", type = HttpParamType.COMMON, description = "页码长度", valueDef = "20") Integer limit,
            @HttpParam(name = "title", type = HttpParamType.COMMON, description = "搜索标题") String title) throws ServiceException;

}
